POV-Ray : Newsgroups : povray.general : while-loop in macro : Re: while-loop in macro Server Time
4 Aug 2024 18:20:38 EDT (-0400)
  Re: while-loop in macro  
From: Lenx
Date: 24 Feb 2003 12:55:02
Message: <web.3e5a5c25d27a3e2e293f3c960@news.povray.org>
thanks Christopher, you made it clear to me.

i was complaining about the macro, working on itsself, but not working when
called in an object.
so the macro renders without errors, but called in an object it gives error.

thanks to you all!


//code is now:
#macro Fence(Flength, Fheight, Fspace, Fdiam)

   union{
   #local I=0;
   #while(I< Flength/Fspace+1 )
         cylinder{
            <0,0,0> <0,Fheight,0> Fdiam/2
            translate <I*Fspace, 0, 0>
            }
      #local I=I+1;
   #end
   }

#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.